load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")

oncall("scm_client_infra")

cpp_unittest(
    name = "startup_logger_test",
    srcs = ["StartupLoggerTest.cpp"],
    compatible_with = [
        "ovr_config//os:linux",
    ],
    deps = [
        "fbsource//third-party/googletest:gmock",
        "fbsource//third-party/googletest:gtest",
        "//eden/common/telemetry:log_info",
        "//eden/common/utils:file_utils",
        "//eden/common/utils:process",
        "//eden/fs/service:startup_logger",
        "//eden/fs/service:startup_status_subscriber",
        "//folly:file",
        "//folly:file_util",
        "//folly/init:init",
        "//folly/logging:logging",
        "//folly/testing:test_util",
    ],
)

cpp_unittest(
    name = "startup_status_subscriber_test",
    srcs = ["StartupStatusSubscriberTest.cpp"],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//eden/fs/service:startup_status_subscriber",
        "//eden/fs/utils:eden_error",
    ],
)

cpp_unittest(
    name = "thrift_stream_startup_status_subscriber_test",
    srcs = ["ThriftStreamStartupStatusSubscriberTest.cpp"],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//eden/fs/service:thrift_startup_status_subscriber",
    ],
)

cpp_unittest(
    name = "periodic_task_test",
    srcs = ["PeriodicTaskTest.cpp"],
    compatible_with = [
        "ovr_config//os:linux",
        "ovr_config//os:windows",
    ],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/googletest:gmock",
        "fbsource//third-party/googletest:gtest",
        "//eden/fs/service:server",
        "//eden/fs/testharness:test_server",
        "//folly/io/async/test:util",
        "//folly/logging:logging",
        "//folly/logging/test:test_handler",
        "//thrift/lib/cpp2:server",
    ],
)

cpp_unittest(
    name = "thrift_glob_impl_test",
    srcs = ["ThriftGlobImplTest.cpp"],
    compatible_with = [
        "ovr_config//os:linux",
        "ovr_config//os:windows",
    ],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//eden/fs/inodes:inodes",
        "//eden/fs/service:thrift-cpp2-types",
        "//eden/fs/service:thrift_glob_impl",
        "//eden/fs/store:context",
        "//eden/fs/testharness:fake_backing_store_and_tree_builder",
        "//eden/fs/testharness:test_mount",
        "//eden/fs/testharness:test_server_state",
    ],
)

cpp_unittest(
    name = "pretty_printers_test",
    srcs = ["PrettyPrintersTest.cpp"],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//eden/common/utils:utils",
        "//eden/fs/service:pretty_printers",
    ],
)

cpp_unittest(
    name = "eden_service_handler_cancellation_test",
    srcs = ["EdenServiceHandlerCancellationTest.cpp"],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//eden/fs/service:server",
        "//folly:cancellation_token",
        "//folly/futures:core",
    ],
)

cpp_unittest(
    name = "eden_server_test",
    srcs = ["EdenServerTest.cpp"],
    labels = ["autodeps2_generated"],
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//eden/fs/service:server",
        "//eden/fs/testharness:test_server",
        "//folly:cancellation_token",
    ],
)
